//
//  FundGuaranteeViewController.m
//  TenThousand
//
//  Created by 宁宁 on 16/7/25.
//  Copyright © 2016年 baixue. All rights reserved.
//

#import "FundGuaranteeViewController.h"

@interface FundGuaranteeViewController ()

@end

@implementation FundGuaranteeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.view.backgroundColor = [UIColor colorWithRed:237/255.0 green:237/255.0 blue:237/255.0 alpha:1];
    
    [self setView];
}

- (void)setView{
    
    UILabel *title1 = [[UILabel alloc] initWithFrame:CGRectMake(8, 15, Screen_Width - 16, 20)];
    title1.text = @"第三方资金托管";
    title1.font = [UIFont boldSystemFontOfSize:16];
    [self.view addSubview:title1];
    
    UIView *bgview1 = [[UIView alloc] initWithFrame:CGRectMake(8, title1.frame.origin.y + title1.frame.size.height + 10, Screen_Width - 16, 1000)];
    bgview1.backgroundColor = [UIColor whiteColor];
    
    UILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake(12, 12, Screen_Width - 24 - 16, Screen_Height)];
    label1.font = [UIFont systemFontOfSize:14];
    label1.numberOfLines = 0;
    NSString *phone = @"第三方资金托管实现资金流与信息流分离，高度保障用户资金安全，资金由国有银行和第三方支付公司进行监管";
    //设置label行距
    NSMutableAttributedString *attributedString1 = [[NSMutableAttributedString alloc] initWithString:phone];
    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
    [paragraphStyle setLineSpacing:9];
    [attributedString1 addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [phone length])];
    label1.attributedText = attributedString1;
    [label1 sizeToFit];
    
    bgview1.frame = CGRectMake(8, title1.frame.origin.y + title1.frame.size.height + 10, Screen_Width - 16, label1.frame.size.height + 24);
    [bgview1 addSubview:label1];
    [self.view addSubview:bgview1];
    
    
    
    UILabel *title2 = [[UILabel alloc] initWithFrame:CGRectMake(8, bgview1.frame.origin.y + bgview1.frame.size.height + 20, Screen_Width - 16, 20)];
    title2.text = @"账户安全";
    title2.font = [UIFont boldSystemFontOfSize:16];
    [self.view addSubview:title2];
    
    UIView *bgview2 = [[UIView alloc] initWithFrame:CGRectMake(8, title2.frame.origin.y + title2.frame.size.height + 10, Screen_Width - 16, 1000)];
    bgview2.backgroundColor = [UIColor whiteColor];
    
    UILabel *label2 = [[UILabel alloc] initWithFrame:CGRectMake(12, 12, Screen_Width - 24 - 16, Screen_Height)];
    label2.font = [UIFont systemFontOfSize:14];
    label2.numberOfLines = 0;
    NSString *address = @"四重身份认证要素，资金同卡进出\n顶级信息安全技术SSL加密保障用户信息";
    //设置label行距
    NSMutableAttributedString *attributedString2 = [[NSMutableAttributedString alloc] initWithString:address];
    [attributedString2 addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [address length])];
    label2.attributedText = attributedString2;
    [label2 sizeToFit];
    
    bgview2.frame = CGRectMake(8, title2.frame.origin.y + title2.frame.size.height + 10, Screen_Width - 16, label2.frame.size.height + 24);
    [bgview2 addSubview:label2];
    [self.view addSubview:bgview2];
}

@end
